package com.gdufe.seckill.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gdufe.common.utils.PageUtils;
import com.gdufe.common.utils.Query;
import com.gdufe.seckill.dao.SessionDao;
import com.gdufe.seckill.entity.SessionEntity;
import com.gdufe.seckill.service.SessionUserService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;


@Service("SessionUserService")
public class SessionUserServiceImpl extends ServiceImpl<SessionDao, SessionEntity> implements SessionUserService {

    @Override
    public List<SessionEntity> getSessions() {
        List<SessionEntity> sessions = new ArrayList<>();
        QueryWrapper<SessionEntity> wrapper = new QueryWrapper<>();
        wrapper.groupBy("id");


        sessions =  this.baseMapper.selectList(wrapper);


        return sessions;
    }

}